package com.mars.push.core.channel;

import com.mars.fw.common.utils.SpringUtil;
import com.mars.push.api.common.PushType;
import com.mars.push.core.channel.side.JPushChannel;
import org.springframework.stereotype.Component;

/**
 * @Author King
 * @create 2020/5/25 11:07
 */
@Component
public class PushChannelContext {

    public JPushChannel instance(Integer type) {
        if (PushType.J_PUSH.getCode() == type) {
            return SpringUtil.getBean(JPushChannel.class);
        } else {
            return SpringUtil.getBean(JPushChannel.class);
        }
    }
}
